Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#18934] universal scanner in wallet receive #19409

Merged
merged 5 commits into from
Mar 27, 2024

Conversation

ulisesmac
Copy link
Contributor

@ulisesmac ulisesmac commented Mar 26, 2024

fixes #18934
fixes #19411

Summary

This PR mounts the universal QR code scanner in the wallet receive modal although correct redirections are not complete yet.

Additionally this PR solves some other small bugs:

  • The QR code component was breaking due to the linear gradient when an unknown color is received (we received :yinYang).
  • When an address was detected by the QR scanner, we tried to navigate to :wallet-accounts instead of :wallet.accounts (dot separated).

Review notes

Although scanning seems useless atm, the QR code scanner is properly dispatched, please take it into consideration while testing.

Platforms

  • Android
  • iOS

Steps to test

  • Open Status
  • Go to Wallet -> Select an account -> Press the receive button -> Press the scann button, now the scanner is displayed.

status: ready

@ulisesmac ulisesmac requested review from alwx, ibrkhalil and a team March 26, 2024 19:12
@ulisesmac ulisesmac self-assigned this Mar 26, 2024
@ulisesmac
Copy link
Contributor Author

Adding skip-manual-qa since it's a small PR/feature and also still a bit incomplete.

@status-im-auto
Copy link
Member

status-im-auto commented Mar 26, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e5dd184 #2 2024-03-26 19:23:51 ~7 min android-e2e 🤖apk 📲
✔️ e5dd184 #2 2024-03-26 19:24:00 ~7 min android 🤖apk 📲
✔️ e5dd184 #2 2024-03-26 19:24:57 ~8 min ios 📱ipa 📲
✔️ b68e76d #4 2024-03-27 15:40:56 ~5 min tests 📄log
✔️ b68e76d #3 2024-03-27 15:42:45 ~6 min android 🤖apk 📲
✔️ b68e76d #3 2024-03-27 15:43:16 ~7 min android-e2e 🤖apk 📲
✔️ b68e76d #3 2024-03-27 15:51:25 ~15 min ios 📱ipa 📲

(seq time-frame-to-string))
[custom-time-frame time-frame-to-string])]
[rn/view {:style style/row-centered}
(when (seq time-frame-string)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to use string/blank? to check for string emptiness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just refactored this code to remove the unnecessary :<> there.

But I agree, I'll update it, to improve the whole piece of code 👍 thanks for spotting it!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ibrkhalil

I checked the implementation, and I'd prefer keep it as is since it's a bit complex, it's not just about checking a string.

the component receives:
time-frame, time-frame-string and time-frame-to-string.

then it shadows
time-frame-string with (time-string time-frame time-frame-string)

and sometimes time-frame-string will take the value of the received time-frame-string, so I guess the decision to use seq was because it's more general.

Since it's a bit hard to track all the flow to make sure this won't create a bug in some cases, I'd prefer to keep it as is, additionally, the seq is being used in a translation string, so it won't be "" or " ".

@J-Son89
Copy link
Contributor

J-Son89 commented Mar 26, 2024

would be nice to have a video or photo attached in the pr description 👍

@status-im-auto
Copy link
Member

92% of end-end tests have passed

Total executed tests: 48
Failed tests: 3
Expected to fail tests: 1
Passed tests: 44
IDs of failed tests: 702784,702783,703496 
IDs of expected to fail tests: 703503 

Failed tests (3)

Click to expand
  • Rerun failed tests

  • Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Test setup failed: critical/chats/test_1_1_public_chats.py:551: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:1000: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:129: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783

    Device 1: Click until ChatMessageInput by accessibility id: chat-message-input will be presented
    Device 1: Sending message 'hey'

    Test setup failed: critical/chats/test_1_1_public_chats.py:551: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:1000: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:129: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    Device sessions

    3. test_1_1_chat_mute_chat, id: 703496

    Test setup failed: critical/chats/test_1_1_public_chats.py:551: in prepare_devices
        self.chat_1.send_message('hey')
    ../views/chat_view.py:1000: in send_message
        self.chat_message_input.wait_for_element(wait_chat_input_sec)
    ../views/base_element.py:129: in wait_for_element
        raise TimeoutException(
     Device `1`: `ChatMessageInput` by` accessibility id`: `chat-message-input` is not found on the screen after wait_for_element
    



    Expected to fail tests (1)

    Click to expand

    Class TestCommunityOneDeviceMerged:

    1. test_community_discovery, id: 703503

    Test is not run, e2e blocker  
    

    [[reason: [NOTRUN] Curated communities not loading, https://github.com//issues/17852]]

    Passed tests (44)

    Click to expand

    Class TestCommunityMultipleDeviceMerged:

    1. test_community_several_images_send_reply, id: 703194
    Device sessions

    2. test_community_one_image_send_reply, id: 702859
    Device sessions

    3. test_community_emoji_send_copy_paste_reply, id: 702840
    Device sessions

    4. test_community_mark_all_messages_as_read, id: 703086
    Device sessions

    5. test_community_contact_block_unblock_offline, id: 702894
    Device sessions

    6. test_community_edit_delete_message_when_offline, id: 704615
    Device sessions

    7. test_community_message_delete, id: 702839
    Device sessions

    8. test_community_message_send_check_timestamps_sender_username, id: 702838
    Device sessions

    9. test_community_links_with_previews_github_youtube_twitter_gif_send_enable, id: 702844
    Device sessions

    10. test_community_message_edit, id: 702843
    Device sessions

    11. test_community_unread_messages_badge, id: 702841
    Device sessions

    Class TestOneToOneChatMultipleSharedDevicesNewUi:

    1. test_1_1_chat_emoji_send_reply_and_open_link, id: 702782
    Device sessions

    2. test_1_1_chat_text_message_delete_push_disappear, id: 702733
    Device sessions

    3. test_1_1_chat_push_emoji, id: 702813
    Device sessions

    4. test_1_1_chat_non_latin_messages_stack_update_profile_photo, id: 702745
    Device sessions

    5. test_1_1_chat_edit_message, id: 702855
    Device sessions

    6. test_1_1_chat_send_image_save_and_share, id: 703391
    Device sessions

    7. test_1_1_chat_pin_messages, id: 702731
    Device sessions

    8. test_1_1_chat_message_reaction, id: 702730
    Device sessions

    Class TestGroupChatMultipleDeviceMergedNewUI:

    1. test_group_chat_pin_messages, id: 702732
    Device sessions

    2. test_group_chat_mute_chat, id: 703495
    Device sessions

    3. test_group_chat_send_image_save_and_share, id: 703297
    Device sessions

    4. test_group_chat_reactions, id: 703202
    Device sessions

    5. test_group_chat_join_send_text_messages_push, id: 702807
    Device sessions

    6. test_group_chat_offline_pn, id: 702808
    Device sessions

    Class TestActivityMultipleDevicePRTwo:

    1. test_activity_center_mentions, id: 702957
    Device sessions

    2. test_activity_center_admin_notification_accept_swipe, id: 702958
    Device sessions

    Class TestDeepLinksOneDevice:

    1. test_links_open_universal_links_from_chat, id: 704613
    Device sessions

    2. test_links_deep_links, id: 702775
    Device sessions

    Class TestCommunityMultipleDeviceMergedTwo:

    1. test_community_markdown_support, id: 702809
    Device sessions

    2. test_community_hashtag_links_to_community_channels, id: 702948
    Device sessions

    3. test_community_mentions_push_notification, id: 702786
    Device sessions

    4. test_community_leave, id: 702845
    Device sessions

    5. test_community_join_when_node_owner_offline, id: 703629
    Device sessions

    Class TestActivityMultipleDevicePR:

    1. test_navigation_jump_to, id: 702936
    Device sessions

    2. test_activity_center_reply_read_unread_delete_filter_swipe, id: 702947
    Device sessions

    Class TestCommunityOneDeviceMerged:

    1. test_restore_multiaccount_with_waku_backup_remove_switch, id: 703133
    Device sessions

    2. test_community_copy_and_paste_message_in_chat_input, id: 702742
    Device sessions

    3. test_community_undo_delete_message, id: 702869
    Device sessions

    4. test_community_navigate_to_channel_when_relaunch, id: 702846
    Device sessions

    5. test_community_mute_community_and_channel, id: 703382
    Device sessions

    Class TestActivityCenterContactRequestMultipleDevicePR:

    1. test_add_contact_field_validation, id: 702777
    Device sessions

    2. test_activity_center_contact_request_accept_swipe_mark_all_as_read, id: 702851
    Device sessions

    3. test_activity_center_contact_request_decline, id: 702850
    Device sessions

    @VolodLytvynenko VolodLytvynenko self-assigned this Mar 27, 2024
    @status-im-auto
    Copy link
    Member

    100% of end-end tests have passed

    Total executed tests: 3
    Failed tests: 0
    Expected to fail tests: 0
    Passed tests: 3
    

    Passed tests (3)

    Click to expand

    Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:

    1. test_1_1_chat_mute_chat, id: 703496
    Device sessions

    2. test_1_1_chat_is_shown_message_sent_delivered_from_offline, id: 702783
    Device sessions

    3. test_1_1_chat_delete_via_long_press_relogin, id: 702784
    Device sessions

    @VolodLytvynenko
    Copy link
    Contributor

    Hi @ulisesmac. Thank you for PR. Ready to be merged

    @pavloburykh
    Copy link
    Contributor

    @ulisesmac ready to be merged and cherrypicked. cc @cammellos

    @ulisesmac ulisesmac force-pushed the 18934-universal-scanner-in-wallet-receive branch from e5dd184 to b68e76d Compare March 27, 2024 15:35
    @ulisesmac ulisesmac merged commit 7de1f95 into develop Mar 27, 2024
    6 checks passed
    @ulisesmac ulisesmac deleted the 18934-universal-scanner-in-wallet-receive branch March 27, 2024 16:01
    cammellos pushed a commit that referenced this pull request Mar 27, 2024
    * Fix linear-gradient breaking when `customization-color` is unknown
    
    * Fix exception when scanning an address due to non-existing navigation route
    
    * Dispatches universal QR code scanner on share address modal
    mmilad75 pushed a commit that referenced this pull request Apr 2, 2024
    * Fix linear-gradient breaking when `customization-color` is unknown
    
    * Fix exception when scanning an address due to non-existing navigation route
    
    * Dispatches universal QR code scanner on share address modal
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Archived in project
    7 participants